﻿using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;

//namespace YDreams
//{
//    public static class Debugging
//    {
//        [Conditional("DEBUG")]
//        public static void WarnOnce(ref string message)
//        {
//            if (message == null)
//                return;

//            Debug.WriteLine(message);
//            message = null;
//        }
//    }
//}

namespace System
{
	public class Consts
	{
		public const string AssemblySystem_Design = "System.Design.dll";
		public const string AssemblySystem_Windows_Forms = "System.Windows.Forms.dll";
	}
}

//namespace System.Reflection
//{
//    public class MonoMethod : MethodInfo
//    {
//        public override MethodInfo GetBaseDefinition()
//        {
//            throw new NotImplementedException();
//        }

//        public override ICustomAttributeProvider ReturnTypeCustomAttributes
//        {
//            get { throw new NotImplementedException(); }
//        }

//        public override MethodAttributes Attributes
//        {
//            get { throw new NotImplementedException(); }
//        }

//        public override MethodImplAttributes GetMethodImplementationFlags()
//        {
//            throw new NotImplementedException();
//        }

//        public override ParameterInfo[] GetParameters()
//        {
//            throw new NotImplementedException();
//        }

//        public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, Globalization.CultureInfo culture)
//        {
//            throw new NotImplementedException();
//        }

//        public override RuntimeMethodHandle MethodHandle
//        {
//            get { throw new NotImplementedException(); }
//        }

//        public override Type DeclaringType
//        {
//            get { throw new NotImplementedException(); }
//        }

//        public override object[] GetCustomAttributes(Type attributeType, bool inherit)
//        {
//            throw new NotImplementedException();
//        }

//        public override object[] GetCustomAttributes(bool inherit)
//        {
//            throw new NotImplementedException();
//        }

//        public override bool IsDefined(Type attributeType, bool inherit)
//        {
//            throw new NotImplementedException();
//        }

//        public override string Name
//        {
//            get { throw new NotImplementedException(); }
//        }

//        public override Type ReflectedType
//        {
//            get { throw new NotImplementedException(); }
//        }
//    }
//}

namespace System
{
	public static class Extensions
	{
		//public static bool IsNullOrWhiteSpace(this string value)
		//{
		//    if (value == null) return true;

		//    for (var i = 0; i < value.Length; i++)
		//        if (!Char.IsWhiteSpace(value[i])) return false;

		//    return true;
		//}

		public static Attribute DefaultAttribute = default(Attribute);

		public static bool IsDefaultAttribute(this Attribute attribute)
		{
			return attribute == DefaultAttribute;
		}

		public static bool Has(this Enum value, Enum flag)
		{
			return value.HasFlag(flag);
		}
	}
}